import {getCurrentDate, getAgoMonthDate} from '@/util/date'
export const tableOption = {
  "border": true,
  "index": true,
  "indexLabel": "序号",
  "stripe": true,
  "menuAlign": "center",
  "align": "center",
  "dialogClickModal": false,
  "searchMenuSpan": 6,
  // viewBtn: true,
  labelWidth: 150,
  "column": [
	  {
      "type": "input",
      "label": "编号",
      "prop": "assetId",
      "span": 12,
      hide: true,
      addDisplay: false,
      editDisplay: false
    },	  {
      "type": "select",
      "label": "状态",
      search: true,
      "prop": "status",
      value: '0',
      dicUrl: '/admin/dict/type/asset_use_status',
      "span": 12
    },	  {
      "type": "select",
      "label": "业务状态",
      search: true,
      "prop": "bizStatus",
      addDisplay: false,
      editDisplay: false,
      value: '0',
      dicUrl: '/admin/dict/type/asset_record_method',
      "span": 12
    },	  {
      "type": "select",
      "label": "类别",
      "prop": "categoryId",
      "span": 12
    },	  {
      "type": "input",
      "label": "编码",
      "prop": "no",
      "span": 12
    // },	  {
    //   "type": "input",
    //   "label": "拼音缩写",
    //   "prop": "pinyin",
    //   "span": 12
    },	  {
      "type": "input",
      "label": "名称",
      "prop": "name",
      search: true,
      "span": 12
    },	  {
      "type": "input",
      "label": "标准型号",
      "prop": "modelId",
      hide: true,
      showColumn:false,
      "span": 12,
      dicUrl: '/act/assetmodel/page?size=-1',
      props: {
        label: 'name',
        value:'modelId',
        res: "data.records"
      },
      addDisplay: false,
      editDisplay: false
    },	  {
      "type": "input",
      "label": "品牌",
      "prop": "brand",
      "span": 12
    },	  {
      "type": "input",
      "label": "规格",
      "prop": "spec",
      "span": 12
    },	  {
      "type": "input",
      "label": "单位",
      "prop": "unit",
      "span": 12
    },	  {
      "type": "input",
      "label": "sn号",
      "prop": "sn",
      "span": 12
    },	  {
      "type": "input",
      "label": "RFID",
      "prop": "rfid",
      "span": 12
    },	  {
      "type": "select",
      "label": "来源",
      "prop": "source",
      dicUrl: '/admin/dict/type/asset_source',
      "span": 12
    },	  {
      "type": "input",
      "label": "购入日期",
      "prop": "buyDate",
      width: 100,
      "span": 12
    },	  {
      "type": "input",
      "label": "金额",
      "prop": "price",
      "span": 12
    },	  {
      "type": "select",
      "label": "区域",
      "prop": "areaId",
      dicUrl: '/admin/sysarea/page?size=-1',
      props: {
        label: 'name',
        value:'areaId',
        res: "data.records"
      },
      "span": 12
    },	  {
      "type": "input",
      "label": "存放地点",
      "prop": "address",
      "span": 12,
      hide: true,
    },	  {
      "type": "input",
      "label": "使用期限（月）",
      "prop": "timeLimit",
      width: 120,
      "span": 12
    },	  {
      "type": "input",
      "label": "备注",
      "prop": "remark",
      hide: true,
      "span": 24
    },	  {
      type: 'upload',
      span: 24,
      loadText: '附件上传中，请稍等',
      listType:'picture-img',
      accept: ["image/png","image/jpeg","image/jpg"],
      tip: '只能上传jpg，png图片不超过20MB',
      fileSize: 20480,
      propsHttp: {
          res: 'data'
      },
      canvasOption: {
        text: ' ',
        ratio: 0.1
      },
      hide: true,
      action: "/act/file/upload",
      "label": "图片",
      "prop": "cover"
    },	  {
      "type": "input",
      "label": "附件",
      "prop": "attachment",
      hide: true,
      showColumn:false,
      "span": 12
    },	  {
      "type": "input",
      "label": "录入人",
      "prop": "createRealname",
      "span": 12
    },	  {
      "type": "input",
      "label": "创建部门名称",
      "prop": "createDeptName",
      hide: true,
      editDisabled: true,
      addDisplay: false,
      "span": 12
    },	  {
      "type": "input",
      "label": "使用用户名称",
      "prop": "useRealname",
      "span": 12
    },	  {
      "type": "input",
      "label": "使用部门名称",
      "prop": "useDeptName",
      "span": 12
    },	  {
      "type": "input",
      "label": "管理员名称",
      "prop": "handleRealname",
      "span": 12
    },	  {
      "type": "input",
      "label": "创建时间",
      "prop": "createTime",
      hide: true,
      editDisabled: true,
      addDisplay: false,
      "span": 12
    },	  {
      "type": "input",
      "label": "更新时间",
      "prop": "updateTime",
      hide: true,
      editDisabled: true,
      addDisplay: false,
      "span": 12
    },	  {
      "type": "input",
      "label": "供应商",
      "prop": "supplier",
      "span": 12
    },	  {
      "type": "input",
      "label": "联系人",
      "prop": "contact",
      "span": 12
    },	  {
      "type": "input",
      "label": "联系方式",
      "prop": "phone",
      "span": 12
    },	  {
      "type": "input",
      "label": "负责人",
      "prop": "maintenanceHandleRealname",
      "span": 12
    },	  {
      "type": "input",
      "label": "维保到期",
      "prop": "maintenanceExpireDate",
      width: 100,
      "span": 12
    },	  {
      "type": "input",
      "label": "维保说明",
      "prop": "maintenanceRemark",
      hide: true,
      "span": 12
    }  ]
}

export const tableOption1 = {
  "border": true,
  "index": true,
  "indexLabel": "序号",
  "stripe": true,
  "menuAlign": "center",
  "align": "center",
  "dialogClickModal": false,
  "searchMenuSpan": 6,
  // viewBtn: true,
  labelWidth: 150,
  "column": [
	  {
      "type": "input",
      "label": "编号",
      "prop": "assetId",
      "span": 12,
      hide: true,
      addDisplay: false,
      editDisplay: false
    },	  {
      "type": "select",
      "label": "类别",
      "prop": "categoryId",
      "span": 12
    },	  {
      "type": "input",
      "label": "编号",
      "prop": "modelId",
      showColumn: false,
      "span": 12,
      hide: true,
      addDisplay: false,
      editDisplay: false
    },	  {
      "type": "select",
      "label": "状态",
      search: true,
      "prop": "status",
      value: '0',
      dicUrl: '/admin/dict/type/asset_use_status',
      "span": 12
    },	  {
      "type": "input",
      "label": "编码",
      "prop": "no",
      "span": 12
    // },	  {
    //   "type": "input",
    //   "label": "拼音缩写",
    //   "prop": "pinyin",
    //   "span": 12
    },	  {
      "type": "date",
      "label": "到期开始时间",
      "prop": "expireStartDate",
      searchLabelWidth: 120,
      format: 'yyyy-MM-dd',
      valueFormat: 'yyyy-MM-dd',
      search: true,
      showColumn: false,
      hide: true,
      searchValue: getCurrentDate('year'),
      addDisplay: false,
      editDisplay: false,
      "span": 12
    },	  {
      "type": "date",
      "label": "到期结束时间",
      "prop": "expireEndDate",
      searchLabelWidth: 120,
      format: 'yyyy-MM-dd',
      valueFormat: 'yyyy-MM-dd',
      search: true,
      showColumn: false,
      hide: true,
      searchValue: getAgoMonthDate(1),
      addDisplay: false,
      editDisplay: false,
      "span": 12
    },	  {
      "type": "input",
      "label": "名称",
      "prop": "name",
      search: true,
      "span": 12
    },	  {
      "type": "input",
      "label": "品牌",
      "prop": "brand",
      "span": 12
    },	  {
      "type": "input",
      "label": "规格",
      "prop": "spec",
      "span": 12
    },	  {
      "type": "input",
      "label": "单位",
      "prop": "unit",
      "span": 12
    },	  {
      "type": "input",
      "label": "sn号",
      "prop": "sn",
      "span": 12
    },	  {
      "type": "input",
      "label": "RFID",
      "prop": "rfid",
      "span": 12
    },	  {
      "type": "select",
      "label": "来源",
      "prop": "source",
      dicUrl: '/admin/dict/type/asset_source',
      "span": 12
    },	  {
      "type": "input",
      "label": "购入日期",
      "prop": "buyDate",
      width: 100,
      "span": 12
    },	  {
      "type": "input",
      "label": "金额",
      "prop": "price",
      "span": 12
    },	  {
      "type": "select",
      "label": "区域",
      "prop": "areaId",
      dicUrl: '/admin/sysarea/page?size=-1',
      props: {
        label: 'name',
        value:'areaId',
        res: "data.records"
      },
      "span": 12
    },	  {
      "type": "input",
      "label": "存放地点",
      "prop": "address",
      "span": 12,
      hide: true,
    },	  {
      "type": "input",
      "label": "使用期限（月）",
      "prop": "timeLimit",
      width: 120,
      "span": 12
    },	  {
      "type": "input",
      "label": "备注",
      "prop": "remark",
      hide: true,
      "span": 24
    },	  {
      type: 'upload',
      span: 24,
      loadText: '附件上传中，请稍等',
      listType:'picture-img',
      accept: ["image/png","image/jpeg","image/jpg"],
      tip: '只能上传jpg，png图片不超过20MB',
      fileSize: 20480,
      propsHttp: {
          res: 'data'
      },
      canvasOption: {
        text: ' ',
        ratio: 0.1
      },
      action: "/act/file/upload",
      "label": "图片",
      "prop": "cover"
    },	  {
      "type": "input",
      "label": "附件",
      "prop": "attachment",
      hide: true,
      showColumn:false,
      "span": 12
    },	  {
      "type": "input",
      "label": "录入人",
      "prop": "createRealname",
      "span": 12
    },	  {
      "type": "input",
      "label": "创建部门名称",
      "prop": "createDeptName",
      hide: true,
      editDisabled: true,
      addDisplay: false,
      "span": 12
    },	  {
      "type": "input",
      "label": "使用用户名称",
      "prop": "useRealname",
      "span": 12
    },	  {
      "type": "input",
      "label": "使用部门名称",
      "prop": "useDeptName",
      "span": 12
    },	  {
      "type": "input",
      "label": "管理员名称",
      "prop": "handleRealname",
      "span": 12
    },	  {
      "type": "input",
      "label": "创建时间",
      "prop": "createTime",
      hide: true,
      editDisabled: true,
      addDisplay: false,
      "span": 12
    },	  {
      "type": "input",
      "label": "更新时间",
      "prop": "updateTime",
      hide: true,
      editDisabled: true,
      addDisplay: false,
      "span": 12
    },	  {
      "type": "input",
      "label": "供应商",
      "prop": "supplier",
      "span": 12
    },	  {
      "type": "input",
      "label": "联系人",
      "prop": "contact",
      "span": 12
    },	  {
      "type": "input",
      "label": "联系方式",
      "prop": "phone",
      "span": 12
    },	  {
      "type": "input",
      "label": "负责人",
      "prop": "maintenanceHandleRealname",
      "span": 12
    },	  {
      "type": "input",
      "label": "维保到期",
      "prop": "maintenanceExpireDate",
      width: 100,
      "span": 12
    },	  {
      "type": "input",
      "label": "维保说明",
      "prop": "maintenanceRemark",
      hide: true,
      "span": 12
    }  ]
}

export const tableOption2 = {
  "border": true,
  "index": true,
  "indexLabel": "序号",
  "stripe": true,
  "menuAlign": "center",
  "align": "center",
  "dialogClickModal": false,
  "searchMenuSpan": 6,
  // viewBtn: true,
  labelWidth: 150,
  "column": [
	  {
      "type": "input",
      "label": "编号",
      "prop": "assetId",
      "span": 12,
      hide: true,
      addDisplay: false,
      editDisplay: false
    },	  {
      "type": "select",
      "label": "类别",
      "prop": "categoryId",
      "span": 12
    },	  {
      "type": "input",
      "label": "编号",
      "prop": "modelId",
      showColumn: false,
      "span": 12,
      hide: true,
      addDisplay: false,
      editDisplay: false
    },	  {
      "type": "input",
      "label": "维保到期",
      "prop": "maintenanceExpireDate",
      width: 100,
      "span": 12
    },	  {
      "type": "input",
      "label": "编码",
      "prop": "no",
      "span": 12
    // },	  {
    //   "type": "input",
    //   "label": "拼音缩写",
    //   "prop": "pinyin",
    //   "span": 12
    },	  {
      "type": "date",
      "label": "维保到期开始时间",
      "prop": "maintenanceStartDate",
      searchLabelWidth: 150,
      format: 'yyyy-MM-dd',
      valueFormat: 'yyyy-MM-dd',
      search: true,
      hide: true,
      showColumn: false,
      searchValue: getCurrentDate('year'),
      addDisplay: false,
      editDisplay: false,
      "span": 12
    },	  {
      "type": "date",
      "label": "维保到期结束时间",
      "prop": "maintenanceEndDate",
      searchLabelWidth: 150,
      format: 'yyyy-MM-dd',
      valueFormat: 'yyyy-MM-dd',
      search: true,
      hide: true,
      showColumn: false,
      searchValue: getAgoMonthDate(1),
      addDisplay: false,
      editDisplay: false,
      "span": 12
    },	  {
      "type": "input",
      "label": "名称",
      "prop": "name",
      search: true,
      "span": 12
    },	  {
      "type": "input",
      "label": "品牌",
      "prop": "brand",
      "span": 12
    },	  {
      "type": "input",
      "label": "规格",
      "prop": "spec",
      "span": 12
    },	  {
      "type": "input",
      "label": "单位",
      "prop": "unit",
      "span": 12
    },	  {
      "type": "input",
      "label": "sn号",
      "prop": "sn",
      "span": 12
    },	  {
      "type": "input",
      "label": "RFID",
      "prop": "rfid",
      "span": 12
    },	  {
      "type": "select",
      "label": "来源",
      "prop": "source",
      dicUrl: '/admin/dict/type/asset_source',
      "span": 12
    },	  {
      "type": "input",
      "label": "购入日期",
      "prop": "buyDate",
      width: 100,
      "span": 12
    },	  {
      "type": "input",
      "label": "金额",
      "prop": "price",
      "span": 12
    },	  {
      "type": "select",
      "label": "区域",
      "prop": "areaId",
      dicUrl: '/admin/sysarea/page?size=-1',
      props: {
        label: 'name',
        value:'areaId',
        res: "data.records"
      },
      "span": 12
    },	  {
      "type": "input",
      "label": "存放地点",
      "prop": "address",
      "span": 12,
      hide: true,
    },	  {
      "type": "input",
      "label": "使用期限（月）",
      "prop": "timeLimit",
      width: 120,
      "span": 12
    },	  {
      "type": "input",
      "label": "备注",
      "prop": "remark",
      hide: true,
      "span": 24
    },	  {
      type: 'upload',
      span: 24,
      loadText: '附件上传中，请稍等',
      listType:'picture-img',
      accept: ["image/png","image/jpeg","image/jpg"],
      tip: '只能上传jpg，png图片不超过20MB',
      fileSize: 20480,
      propsHttp: {
          res: 'data'
      },
      canvasOption: {
        text: ' ',
        ratio: 0.1
      },
      action: "/act/file/upload",
      "label": "图片",
      "prop": "cover"
    },	  {
      "type": "select",
      "label": "状态",
      search: true,
      "prop": "status",
      value: '0',
      dicUrl: '/admin/dict/type/asset_use_status',
      "span": 12
    },	  {
      "type": "input",
      "label": "附件",
      "prop": "attachment",
      hide: true,
      showColumn:false,
      "span": 12
    },	  {
      "type": "input",
      "label": "录入人",
      "prop": "createRealname",
      "span": 12
    },	  {
      "type": "input",
      "label": "创建部门名称",
      "prop": "createDeptName",
      hide: true,
      editDisabled: true,
      addDisplay: false,
      "span": 12
    },	  {
      "type": "input",
      "label": "使用用户名称",
      "prop": "useRealname",
      "span": 12
    },	  {
      "type": "input",
      "label": "使用部门名称",
      "prop": "useDeptName",
      "span": 12
    },	  {
      "type": "input",
      "label": "管理员名称",
      "prop": "handleRealname",
      "span": 12
    },	  {
      "type": "input",
      "label": "创建时间",
      "prop": "createTime",
      hide: true,
      editDisabled: true,
      addDisplay: false,
      "span": 12
    },	  {
      "type": "input",
      "label": "更新时间",
      "prop": "updateTime",
      hide: true,
      editDisabled: true,
      addDisplay: false,
      "span": 12
    },	  {
      "type": "input",
      "label": "供应商",
      "prop": "supplier",
      "span": 12
    },	  {
      "type": "input",
      "label": "联系人",
      "prop": "contact",
      "span": 12
    },	  {
      "type": "input",
      "label": "联系方式",
      "prop": "phone",
      "span": 12
    },	  {
      "type": "input",
      "label": "负责人",
      "prop": "maintenanceHandleRealname",
      "span": 12
    },	  {
      "type": "input",
      "label": "维保说明",
      "prop": "maintenanceRemark",
      hide: true,
      "span": 12
    }  ]
}

